#define _CRT_SECURE_NO_WARNINGS 1
#include "List.h"

void test()
{
	SLN* SL = NULL;
	SLNPushBack(&SL, 500);
	SLNPushBack(&SL, 500);



	SLNprint(SL);
	//SLNPushBack(&SL, 1);
	//SLNPushBack(&SL, 2);
	//SLNPushBack(&SL, 3);
	//SLNPushBack(&SL, 4);
	//SLNPushFront(&SL, 100);
	//SLNPushFront(&SL, 200);
	//SLNPushBack(&SL, 300);
	/*SLNPushBack(&SL, 500);*/

//SLNprint(SL);
	

}
//
//void test1()
//{
//	SLN* SL = NULL;
//	SLNPushBack(&SL, 1);
//	/*SLNPushBack(&SL, 2);
//	SLNPushBack(&SL, 3);
//	SLNPushBack(&SL, 4);*/
//	SLNPopFront(&SL);
//	///*LNPushFront(&SL, 100);*/*
//	///*SLNPushFront(&SL, 200);*/
//	//SLNPopBack(&SL);
//	SLNprint(SL);
//}

void test2()
{
	SLN* SL = NULL;
	SLNPushBack(&SL, 1);
	SLNPushBack(&SL, 2);
	SLNPushBack(&SL, 3);

	SLNPushBack(&SL, 4);
	SLNPushBack(&SL, 5);
	SLNPushBack(&SL, 6);

	SLN* pos = SLNFind(SL, 1);
	if (pos != NULL)
	{
		SLNDeletepos(&SL, &pos);
	}
	/*SLNPushBack(&SL, 2);
	SLNPushBack(&SL, 3);
	SLN* pos = SLNFind(SL, 3);
	if (pos != NULL)
	{
		SLNEraseAfter(&pos);
	}
	SLNPushBack(&SL, 4);*/
	SLNprint(SL);
}

void test3()
{
	SLN* SL = NULL;
  SLNPushBack(&SL, 1);
  SLNPushBack(&SL, 2);
  SLNPushBack(&SL, 3);
  SLNPushBack(&SL, 4);
  SLN* pos = SLNFind(SL, 1);
  if (pos != NULL)
  {
	  SLNInsertFront(&SL,&pos,100);
	  SLNInsertAfter(&pos, 300);
	  SLNEraseAfter(&pos);
	  SLNDeletepos(&SL, &pos);

  }
  SLNprint(SL);

}
int main()
{
	test3();
	system("pause");
}